/* eslint-disable import/first */
import Vue from 'vue'
Vue.config.productionTip = false

import Vuex from 'vuex'
Vue.use(Vuex)

// 引用外部插件----------------------------
// vue路由
import router from '@/router/index.js'

// Vant
// import Vant from 'vant'
// import 'vant/lib/index.css'
// Vue.use(Vant)

// promise
import promise from 'es6-promise'
promise.polyfill()
// 引用外部插件----------------------------
// import clipboard from 'clipboard'
// Vue.prototype.$clipboard = clipboard
// 配置文件-------------------------------
// 配置碎片
import Config from '@/config'
Vue.prototype.$Config = Config
// 配置文件-------------------------------

// 项目工具型函数--------------------------
import Tool from '@/utils/tool.js'
Vue.prototype.$Tool = Tool
// 全局请求插件--------------------------
import Axios from '@/api/index.js'
Vue.prototype.$Axios = Axios
// 全局请求插件--------------------------
import VueClipboard from 'vue-clipboard2'

Vue.use(VueClipboard)
// 全局设置-----------------------------
// import Component from '@/global/component.js' // 引用自定义全局组件
const Component = require('@/global/component.js') // 引用自定义全局组件

const Methods = require('@/global/methods.js') // 自定义全局混合

const Directive = require('@/global/directive.js') // 自定义全局指令

import Filters from '@/global/filters.js' // 自定义全局过滤
// 全局设置-----------------------------

// vuex
import store from '@/vuex/root.js' // state
// import popstate from '@/utils/popstate.js'
import App from './App.vue'
// popstate()
new Vue({
  router,
  store,
  component: Component,
  mixins: Methods,
  filters: Filters,
  directive: Directive,
  render: h => h(App)
}).$mount('#app')
